<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::factory(10)->create();
        $user = User::find(1);
        $user->assignRole('Founder');
        $user->name = 'Lucy';
        $user->email ='Lucy@qq.com';
        $user->avatar = url('fakers/avatars/face1.jpg');
        $user->introduction = '宝剑锋从磨砺出';
        $user->save();

        $user = User::find(2);
        $user->assignRole('Maintainer');
        $user->name = 'Lily';
        $user->email ='Lily@qq.com';
        $user->avatar = url('fakers/avatars/face16.jpg');
        $user->introduction = '梅花香自苦寒来';
        $user->save();

        $user = User::find(3);
        $user->name = 'Rose';
        $user->email ='Rose@qq.com';
        $user->avatar = url('fakers/avatars/face7.jpg');
        $user->introduction = '如果你知道自己想去哪里，全世界都会为你让路';
        $user->save();
    }
}
